fix(build): report declaration-build failures as AB4716 with the underlying TypeScript diagnostics - #265
Merged
Conversation
…pt diagnostics (#176) Declaration generation rides rsbuild-plugin-dts, which aborts with one prose line naming only its Rslib environment. The CLI wrapped that in the AB5000 catch-all, whose dev-lock meaning misdirected triage of #174's emit-only TS4023 regression, and the five underlying diagnostics were lost — recovering them needed a manual `tsc --declaration --emitDeclarationOnly` replay. The package build now performs that replay itself: on a declaration abort it re-runs declaration emit over the same synthesized dts tsconfig, through the `typescript` resolved from the consumer project, into a throwaway directory, and reports one AB4716 error per recovered diagnostic with the file, (line,column), TS code, message, and sourcePath. AB4716 joins the AB471x package-build `lib` family. Every diagnostic carries a recovery hint naming the trap: emit-only errors such as TS4023 are invisible to `tsc --noEmit`.
🦋 Changeset detectedLatest commit: ef5e125 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #176.
AB4716code (in theAB471xpackage-buildlibfamily) instead of theAB5000catch-all whose dev-lock meaning misdirected triage of feat(routes): migrate audiobook curator to public authoring #150/fix(examples): export CliCommandDefinition so declaration emit can name it #174.typescript(--declaration --emitDeclarationOnly --pretty false), and reports oneAB4716error per recovered TypeScript diagnostic — file,(line,column),TScode, and compiler message, withsourcePathset — in both human and--jsonCLI output.TS4023are invisible totsc --noEmit; replay withtsc --declaration --emitDeclarationOnly.typescript, or the replay passes), the failure still reports as a singleAB4716carrying the bundler's message — neverAB5000.docs/diagnostics.mddocuments the new code; changeset:agent-bundleminor (additive diagnostic contract surface, per repo precedent).Detection keys on rsbuild-plugin-dts's prose failure line (no structured signal exists); if upstream rewords it, declaration failures degrade back to today's behavior rather than breaking.
Test plan
AB4716codes,src/index.ts(3,14)+ message +sourcePath+--noEmitrecovery hint (package-build.test.ts, 14/14 pass)pnpm build,pnpm typecheck,pnpm lintgreen on HEAD rebased overorigin/mainbuild.test.ts,dev-package-build.test.ts,dev-package-build-service.test.tspass